package com.ruoyi.edu.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单管理对象 order
 *
 * @author czdu
 * @date 2022-05-23
 */
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 课程ID */
    @Excel(name = "课程ID")
    private Long courseId;

    /** 订单描述 */
    @Excel(name = "订单描述")
    private String description;

    /** 已用课时 */
    @Excel(name = "已用课时")
    private Long used;

    /** 剩余课时 */
    @Excel(name = "剩余课时")
    private Long remain;

    /** 总课时 */
    @Excel(name = "总课时")
    private Long total;

    /** 收款金额 */
    @Excel(name = "收款金额")
    private Double amount;

    /** 收款凭证 */
    @Excel(name = "收款凭证")
    private String amountReceipt;

    /** 退款凭证 */
    @Excel(name = "退款凭证")
    private String refundReceipt;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 1:正常;2:退款 */
    @Excel(name = "1:正常;2:退款")
    private String orderStatus;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 收款方式：0：现金，1：支付宝，2：微信 */
    @Excel(name = "收款方式：0：现金，1：支付宝，2：微信")
    private String payType;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private Double refund;
    /** 折扣价 */
    @Excel(name = "折扣价")
    private Double discountPrice;

    /** 退款金额 */
    @Excel(name = "课程")
    private Course course;

    /** 学生 */
    private SysUser student;

    /** 创建者 */
    private SysUser creator;

    /** 任课老师 */
    private SysUser teacher;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setCourseId(Long courseId)
    {
        this.courseId = courseId;
    }

    public Long getCourseId()
    {
        return courseId;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setUsed(Long used)
    {
        this.used = used;
    }

    public Long getUsed()
    {
        return used;
    }
    public void setRemain(Long remain)
    {
        this.remain = remain;
    }

    public Long getRemain()
    {
        return remain;
    }
    public void setTotal(Long total)
    {
        this.total = total;
    }

    public Long getTotal()
    {
        return total;
    }
    public void setAmount(Double amount) 
    {
        this.amount = amount;
    }

    public Double getAmount() 
    {
        return amount;
    }
    public void setAmountReceipt(String amountReceipt)
    {
        this.amountReceipt = amountReceipt;
    }

    public String getAmountReceipt()
    {
        return amountReceipt;
    }
    public void setRefundReceipt(String refundReceipt)
    {
        this.refundReceipt = refundReceipt;
    }

    public String getRefundReceipt()
    {
        return refundReceipt;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setOrderStatus(String orderStatus)
    {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus()
    {
        return orderStatus;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }
    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getPayType()
    {
        return payType;
    }
    public void setRefund(Double refund) 
    {
        this.refund = refund;
    }

    public Double getRefund() 
    {
        return refund;
    }
    public void setDiscountPrice(Double discountPrice) 
    {
        this.discountPrice = discountPrice;
    }

    public Double getDiscountPrice() 
    {
        return discountPrice;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }

    public SysUser getStudent() {
        return student;
    }

    public void setStudent(SysUser student) {
        this.student = student;
    }

    public SysUser getCreator() {
        return creator;
    }

    public void setCreator(SysUser creator) {
        this.creator = creator;
    }

    public SysUser getTeacher() {
        return teacher;
    }

    public void setTeacher(SysUser teacher) {
        this.teacher = teacher;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", courseId=" + courseId +
                ", description='" + description + '\'' +
                ", used=" + used +
                ", remain=" + remain +
                ", total=" + total +
                ", amount=" + amount +
                ", amountReceipt='" + amountReceipt + '\'' +
                ", refundReceipt='" + refundReceipt + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", orderStatus='" + orderStatus + '\'' +
                ", delFlag='" + delFlag + '\'' +
                ", payType='" + payType + '\'' +
                ", refund=" + refund +
                ", discountPrice=" + discountPrice +
                ", course=" + course +
                ", student=" + student +
                ", creator=" + creator +
                ", teacher=" + teacher +
                '}';
    }
}
